package Instance;

import javax.crypto.Cipher;

public class EncryptFacade {
    private FileReader reader;
    private CipherMachine cipher;
    private FileWriter writer;

    public EncryptFacade(){
        reader=new FileReader();
        cipher=new CipherMachine();
        writer=new FileWriter();
    }

    public void fileencrypt(String fileNameSrc,String fileNameDes){
        String plainStr=reader.read(fileNameSrc);
        String encryptStr= cipher.encrypt(plainStr);
        writer.write(encryptStr,fileNameDes);
    }
}
